<template>
	<view>
		<view class="container">
			<!-- <view class="nav">
				<image @click="goBack()" src="/static/tell_left.png" mode=""></image>
				<view class="title">客服</view>
			</view> -->
			<view class="header">
				<view class="header_l">
					<view class="text1">HI，有什么可以帮您！</view>
					<view class="text2">客服在线时间：{{help.cf_app_kf_time}}</view>
				</view>
				<image :src="tell_rw_img" mode=""></image>
			</view>
			<view class="load_box">
				<view class="box_item">
					<image :src="tell_icon_1" mode=""></image>
					<view class="title">免单下单</view>
				</view>
				<image class="item_right" src="/static/tell_load.png" mode=""></image>
				<view class="box_item">
					<image :src="tell_icon_2" mode=""></image>
					<view class="title">收货</view>
				</view>
				<image class="item_right" src="/static/tell_load.png" mode=""></image>
				<view class="box_item">
					<image :src="tell_icon_3" mode=""></image>
					<view class="title">归还</view>
				</view>
				<image class="item_right" src="/static/tell_load.png" mode=""></image>
				<view class="box_item">
					<image :src="tell_icon_4" mode=""></image>
					<view class="title">好评</view>
				</view>
			</view>
			<view class="quest_box">
				<view class="quest_head">
					<view class="head_item" @click="nav_click('',0)" :class="navIndex == 0 ? 'head_act' : ''">
						猜你喜欢
					</view>
					<view class="head_item" @click="nav_click(item.id,index+1)" :class="navIndex == index+1 ? 'head_act' : ''" v-for="(item,index) in help.cate_list" :key="index">
						{{item.title}}
					</view>
				</view>
				<view style="margin-top: 40rpx;">
					<u-collapse :border="false">
					    <u-collapse-item :title="item.title" name="1" v-for="(item,index) in help.archives_list" :key="index">
					      <text class="u-collapse-content" v-html="item.content"></text>
					    </u-collapse-item>
					</u-collapse>
				</view>
			</view>
			<view class="footer">
				<view class="footer_item">
					<image src="/static/tell_icon_5.png" mode=""></image>
					<text>在线客服</text>
				</view>
				<view class="footer_item" @click="doCall(help.cf_app_kf_tel)">
					<image src="/static/tell_icon_6.png" mode=""></image>
					<text>电话联系</text>
				</view>
			</view>
		</view>
		<!-- <TabBar :tabBarShow="4"></TabBar> -->
	</view>
</template>

<script>
	import TabBar from '@/components/TabBar/TabBar.vue';
	import config from "@/config";
	export default {
		components: {
			TabBar
		},
		data() {
			return {
				help: {},
				navList: [],
				navIndex: 0,
				tell_rw_img:config.uni_app_web_url + 'static/h5/tell_rw.png',
				tell_icon_1:config.uni_app_web_url + 'static/h5/tell_icon_1.png',
				tell_icon_2:config.uni_app_web_url + 'static/h5/tell_icon_2.png',
				tell_icon_3:config.uni_app_web_url + 'static/h5/tell_icon_3.png',
				tell_icon_4:config.uni_app_web_url + 'static/h5/tell_icon_4.png',
				phone: ''
			}
		},
		onShow() {
		    this.helpList()
		},
		methods: {
			helpList(cid){
				this.$http.gethelp({
					cid: cid
				}).then((res)=>{
				    if(res.status){
						this.help = res.data
				    }
				});
			},
			nav_click(cid,i){
				this.navIndex = i;
				this.helpList(cid)
			}
		}
	}
</script>

<style scoped lang="scss">
	.container {
		min-height: 100vh;
		// padding: 32rpx 32rpx 200rpx 32rpx;
		padding: 32rpx 32rpx 200rpx;
		width: calc(100% - 64rpx);
		background: linear-gradient( 181deg, #BBE0FC 0%, #78C0F9 8%, #ACDCF4 15%, rgba(209,240,241,0.9846) 19%, rgba(209,240,241,0) 100%);		
		.nav{
			display: flex;
			align-items: center;
			image{
				width: 42rpx;
				height: 47rpx;
			}
			.title{
				margin-left: -42rpx;
				flex: 1;
				font-weight: 400;
				font-size: 36rpx;
				color: #FFFFFF;
				text-align: center;
			}
		}
		
		.header{
			display: flex;
			align-items: center;
			justify-content: space-between;
			padding: 20rpx;
			.header_l{
				.text1{
					font-weight: 600;
					font-size: 36rpx;
					color: #333333;
				}
				.text2{
					margin-top: 24rpx;
					font-weight: 400;
					font-size: 24rpx;
					color: #666666;
				}
			}
			image{
				width: 239rpx;
				height: 215rpx;
			}
		}
		.load_box{
			padding: 30rpx 40rpx;
			background: #FFFFFF;
			box-shadow: 0rpx 4rpx 10rpx 0rpx rgba(141,191,252,0.5);
			border-radius: 24rpx;
			display: flex;
			align-items: center;
			justify-content: space-between;
			.item_right{
				margin-top: -45rpx;
				width: 30rpx;
				height: 30rpx;
			}
			.box_item{
				text-align: center;
				image{
					width: 60rpx;
					height: 60rpx;
				}
				.title{
					margin-top: 10rpx;
					font-weight: 400;
					font-size: 24rpx;
					color: #3D3D3D;
				}
			}
		}
		
		.quest_box{
			margin-top: 24rpx;
			padding: 27rpx 32rpx;
			background: #FFFFFF;
			box-shadow: 0rpx 4rpx 10rpx 0rpx rgba(141,191,252,0.5);
			border-radius: 24rpx;
			.quest_head{
				display: flex;
				align-items: center;
				justify-content: space-between;
				font-weight: 400;
				.head_item{
					font-size: 24rpx;
					color: #666666;
					position: relative;
				}
				.head_act{
					font-size: 32rpx;
					color: #333333;
				}
				.head_act::after{
					content: '';
					position: absolute;
					left: calc(50% - 30rpx);
					bottom: -10rpx;
					width: 60rpx;
					height: 4rpx;
					background: #3B76FF;
					border-radius: 44rpx 44rpx 44rpx 44rpx;
				}
			}
		}
		
		.footer{
			position: fixed;
			width: 100%;
			display: flex;
			align-items: center;
			justify-content: space-between;
			left: 0;
			bottom: 0;
			background: #FFFFFF;
			box-shadow: 0rpx -4rpx 10rpx 0rpx rgba(141,191,252,0.5);
			border-radius: 0rpx 0rpx 0rpx 0rpx;
			padding: 37rpx 0 37rpx 0;
			.footer_item:first-child{
				border-right: 2rpx solid #999999;
			}
			.footer_item{
				flex: 1;
				height: 44rpx;
				display: flex;
				align-items: center;
				justify-content: center;
				image{
					width: 40rpx;
					height: 40rpx;
				}
				text{
					font-weight: 400;
					font-size: 32rpx;
					color: #3D3D3D;
					padding-left: 28rpx;
				}
			}
		}
		
		
		
	}
</style>